class AmisValidatorUtils {
	/**
	 * 获取【由字母、数字与下划线组合的2~36位字符的字符串】验证器
	 */
	getAlphanumericUnderlineSchema = (minLength: number = 2, maxLength: number = 36): any => {
		return {
			validations: {
				matchRegexp: `^[A-Za-z0-9_]{${minLength},${maxLength}$`,
			},
			validationErrors: {
				matchRegexp: `请输入由字母、数字与下划线组合的${minLength}~${maxLength}位的字符串`,
			},
		}
	}
}

export default new AmisValidatorUtils()
